home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 118 - YY Proterm2.dsk / TO.ULTA.MACRO.2 / ULTRAMACROS / Macros From SMW.txt < prev    next >
Text File  |  2000-01-01  |  2KB  |  35 lines

  1.  
  2. start
  3.  
  4. This file shows how some Super MacroWorks tokens can be simulated in an UltraMacros macro.
  5.  
  6. <if>
  7. if used to test the character at the cursor. Now it does a whole lot of other things. To simulate the old <if>, use K = peek $10f5. K will equal the cursor character as listed under the high values on the Key Chart:
  8.  
  9. a:<all K = peek $10f5: if K = 160 then print "Cursor is on a space">!
  10.  
  11. <end?>
  12. end? was used to see if the Desktop was empty. Now you can use
  13. C:<all N = peek $C55>! and variable N will equal the number of files currently on the Desktop. This is nice because you can use it any time, and don't have to do an OPEN-APPLE-Q first like with <end?>.
  14.  
  15. <Lprint>
  16. Lprint printed the current cursor line. The following sequence will do the exact same thing:
  17.  
  18. L:<all poke 799,21 : call 795 : L = peek 794 + 1 : { get cursor line }
  19.  pr# 1 :  { to determine the pr# number, do an OPEN-APPLE-P and use the desired printer number as shown by AppleWorks } :
  20.  print screen 1,L,80 : pr# 0>!  print it and reset
  21.  
  22. You can also use commands like <cell> and <getstr> to make a much more flexible line printer macro. Here's a mini "typewriter" macro:
  23.  
  24. T:<all msg ' Enter line and press Return ' : $0 = getstr 60 { get line }
  25.  pr# 1 : print $0 : print chr$ 13 : msg "" : pr# 0>!  print it and reset
  26.  
  27. <menu> and <resume>
  28. These commands were used to let a macro "remember" the current file, go to the Main Menu, and then return to the file. The following macro pair (already in Macros Ultra) do something similar:
  29.  
  30. 1:<all><q = peek $C54 : { get file number } : oa-q esc>!   leave "1" file
  31. 2:<all oa-q print q : rtn>! return "2" the file we left, if Q wasn't changed
  32.  
  33. The rest of the missing Super MacroWorks commands shouldn't cause any problems. Obviously commands like <incvar> are now <A = A + 1> and so on.
  34.  
  35.